/* Individual Collection Page Styling */
.ldr-rag-manager-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: var(--bg-primary, #121212) !important;
    min-height: 100vh;
    color: var(--text-primary, #e4e4e4) !important;
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-rag-manager-container {
        animation: fadeInUp 0.6s ease;
    }
}

/* Header Section */
.ldr-rag-header {
    background: var(--card-bg, #1e1e2d) !important;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color, #333);
    color: var(--text-primary, #e4e4e4) !important;
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-rag-header {
        animation: slideDown 0.6s ease-out;
    }
}

.ldr-rag-header h1 {
    color: var(--text-primary, #e4e4e4) !important;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ldr-rag-header h1 i {
    color: #667eea;
}

.ldr-subtitle {
    color: var(--text-secondary, #999);
    font-size: 1.1rem;
    margin: 10px 0 0 0;
    font-style: italic;
}

/* Section Styling */
.ldr-rag-section {
    background: var(--card-bg, #1e1e2d);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color, #333);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-rag-section {
        animation: fadeInUp 0.8s ease-out;
    }

    .ldr-rag-section:hover {
        transform: translateY(-2px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
}

.ldr-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color, #444);
}

.ldr-section-header h2 {
    color: var(--text-primary, #e4e4e4);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ldr-section-header h2 i {
    color: #667eea;
}

/* Collection Actions Grid */
.ldr-collection-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.ldr-collection-actions-grid .btn {
    padding: 15px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.ldr-collection-actions-grid .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.ldr-collection-actions-grid .btn:hover::before {
    left: 100%;
}

.ldr-btn-primary {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.ldr-btn-primary:hover {
    background: linear-gradient(135deg, #38a169, #2f855a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(72, 187, 120, 0.3);
}

.ldr-btn-success {
    background: linear-gradient(135deg, #4299e1, #3182ce);
    color: white;
}

.ldr-btn-success:hover {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 153, 225, 0.3);
}

.ldr-btn-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

.ldr-btn-warning:hover {
    background: linear-gradient(135deg, #dd6b20, #c05621);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(237, 137, 54, 0.3);
}

.ldr-btn-danger {
    background: linear-gradient(135deg, #f56565, #e53e3e);
    color: white;
}

.ldr-btn-danger:hover {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 101, 101, 0.3);
}

.ldr-btn-secondary {
    background: linear-gradient(135deg, #a0aec0, #718096);
    color: white;
}

.ldr-btn-secondary:hover {
    background: linear-gradient(135deg, #718096, #4a5568);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(160, 174, 192, 0.3);
}

/* Statistics Grid */
.ldr-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.ldr-stat-card {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.ldr-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.ldr-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.ldr-stat-success::before {
    background: linear-gradient(90deg, #48bb78, #38a169);
}

.ldr-stat-warning::before {
    background: linear-gradient(90deg, #ed8936, #dd6b20);
}

.ldr-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #2d3748, #4a5568);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ldr-stat-label {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Controls */
.ldr-filter-controls {
    display: flex;
    gap: 10px;
}

.ldr-filter-controls .btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    background: rgba(255, 255, 255, 0.1);
    color: #4a5568;
    transition: all 0.3s ease;
}

.ldr-filter-controls .btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

.ldr-filter-controls .btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.ldr-filter-controls .btn.active:hover {
    color: white;
}

/* Documents List */
.ldr-documents-list {
    max-height: 600px;
    overflow-y: auto;
    padding: 10px;
}

.ldr-documents-list::-webkit-scrollbar {
    width: 8px;
}

.ldr-documents-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ldr-documents-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.ldr-documents-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* Loading Spinner */
.ldr-loading-spinner {
    text-align: center;
    padding: 40px;
    color: #718096;
    font-size: 1.1rem;
}

.ldr-loading-spinner i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #667eea;
}

/* Empty State */
.ldr-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.ldr-empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #cbd5e0;
}

.ldr-empty-state p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.ldr-empty-state .btn {
    margin-top: 20px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
}

/* Progress Container */
.ldr-progress-container {
    margin: 20px 0;
}

.ldr-progress-bar {
    width: 100%;
    height: 12px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.ldr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ldr-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

.ldr-progress-text {
    text-align: center;
    color: #2b6cb0;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 10px;
}

.ldr-progress-log {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

/* Document Items */
.ldr-document-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
}

.ldr-document-item .ldr-document-info {
    flex: 1;
}

.ldr-document-item .ldr-document-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ldr-document-item .ldr-document-actions button {
    background: transparent;
    border: 1px solid #cbd5e0;
    color: #718096;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.ldr-document-item .ldr-document-actions button:hover {
    background: #edf2f7;
    color: #2d3748;
}

.ldr-document-item .ldr-document-actions .ldr-btn-delete-doc:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
    color: #dc3545;
}

.ldr-document-item .ldr-document-actions .ldr-btn-remove-from-collection:hover {
    background: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
    color: #d69e00;
}

.ldr-document-item .ldr-document-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.ldr-document-item .ldr-document-meta {
    font-size: 0.9rem;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Badge Styles */
.ldr-badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ldr-badge-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.ldr-badge-warning {
    background: linear-gradient(135deg, #ed8936, #dd6b20);
    color: white;
}

/* Upload Results Messages */
.ldr-upload-results {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ldr-success-message {
    color: #38a169;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ldr-error-message {
    color: #e53e3e;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.ldr-error-list {
    margin: 10px 0;
    padding-left: 20px;
}

.ldr-error-list li {
    color: #e53e3e;
    margin-bottom: 5px;
}

/* Log Entry Styles */
.ldr-log-entry {
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    font-weight: 500;
}

.ldr-log-info {
    background: rgba(66, 153, 225, 0.15);
    color: #1a4971;
    border-left: 4px solid #3182ce;
}

.ldr-log-success {
    background: rgba(72, 187, 120, 0.1);
    color: #276749;
    border-left: 3px solid #48bb78;
}

.ldr-log-error {
    background: rgba(245, 101, 101, 0.1);
    color: #c53030;
    border-left: 3px solid #f56565;
}

.ldr-document-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.ldr-document-item:hover::before {
    transform: scaleY(1);
}

.ldr-document-item:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateX(5px);
}

.ldr-document-item.indexed {
    border-left: 4px solid #48bb78;
}

.ldr-document-item.unindexed {
    border-left: 4px solid #ed8936;
}

/* Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ldr-rag-manager-container {
        padding: 15px;
        border-radius: 0;
    }

    .ldr-rag-header h1 {
        font-size: 2rem;
    }

    .ldr-collection-actions-grid {
        grid-template-columns: 1fr;
    }

    .ldr-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .ldr-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .ldr-filter-controls {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ldr-stats-grid {
        grid-template-columns: 1fr;
    }

    .ldr-rag-header {
        padding: 20px;
    }

    .ldr-rag-section {
        padding: 20px;
    }
}

/* Accessibility: Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .ldr-rag-section:hover,
    .ldr-btn-collections:hover,
    .ldr-stat-card:hover,
    .ldr-document-item:hover {
        transform: none !important;
    }

    .ldr-progress-fill::after {
        animation: none !important;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .ldr-rag-manager-container {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }

    .ldr-rag-header,
    .ldr-rag-section {
        background: rgba(45, 55, 72, 0.95);
        color: #f7fafc;
    }

    .ldr-rag-header h1 {
        background: linear-gradient(135deg, #9f7aea, #667eea);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .ldr-section-header h2 {
        color: #f7fafc;
    }

    .ldr-stat-card {
        background: linear-gradient(135deg, #2d3748, #1a202c);
        color: #f7fafc;
    }

    .ldr-stat-value {
        background: linear-gradient(135deg, #f7fafc, #e2e8f0);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .ldr-document-item {
        background: #2d3748;
        color: #f7fafc;
        border-color: #4a5568;
    }

    .ldr-document-item .ldr-document-title {
        color: #f7fafc;
    }

    .ldr-document-item .ldr-document-meta {
        color: #cbd5e0;
    }

    .ldr-document-item .ldr-document-actions button {
        border-color: #4a5568;
        color: #a0aec0;
    }

    .ldr-document-item .ldr-document-actions button:hover {
        background: #4a5568;
        color: #f7fafc;
    }

    .ldr-progress-bar {
        background: #4a5568;
    }

    .ldr-progress-log {
        background: #1a202c;
        color: #f7fafc;
        border-color: #4a5568;
    }

    .ldr-filter-controls .btn {
        background: #2d3748;
        color: #f7fafc;
        border-color: #4a5568;
    }

    .ldr-embedding-settings-card {
        background: rgba(45, 55, 72, 0.95) !important;
        border-color: #4a5568 !important;
    }

    .ldr-embedding-info h4 {
        color: #f7fafc !important;
    }

    .ldr-embedding-info .ldr-info-box {
        background: rgba(26, 32, 44, 0.8) !important;
        border-left-color: #667eea !important;
    }

    .ldr-embedding-info .ldr-info-label {
        color: #cbd5e0 !important;
    }

    .ldr-embedding-info .ldr-info-value {
        color: #f7fafc !important;
    }

    .ldr-progress-text {
        color: #63b3ed;
    }

    .ldr-log-info {
        background: rgba(99, 179, 237, 0.2);
        color: #90cdf4;
        border-left-color: #4299e1;
    }

    .ldr-log-entry {
        color: #e2e8f0;
    }
}

/* Drop Zone Styles */
.ldr-drop-zone {
    border: 3px dashed #667eea;
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    background-color: rgba(102, 126, 234, 0.05);
    cursor: pointer;
    position: relative;
    /* No transition - instant feedback */
}

.ldr-drop-zone:hover {
    border-color: #764ba2;
    background-color: rgba(118, 75, 162, 0.1);
}

/* Drag-over state - INSTANT, very visible */
.ldr-drop-zone.ldr-drag-over {
    border-color: #28a745;
    border-style: solid;
    border-width: 4px;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(32, 201, 151, 0.15) 100%);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3), inset 0 0 30px rgba(40, 167, 69, 0.1);
}

/* Spinner appears when dragging */
.ldr-drop-zone.ldr-drag-over::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 4px solid rgba(40, 167, 69, 0.2);
    border-top-color: #28a745;
    border-radius: 50%;
    animation: drop-spinner 0.6s linear infinite;
    z-index: 10;
}

/* Pulsing glow effect */
.ldr-drop-zone.ldr-drag-over::after {
    content: 'Drop files here!';
    position: absolute;
    bottom: 15px;
    left: 0;
    right: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #28a745;
    animation: pulse-text 0.8s ease-in-out infinite alternate;
}

@keyframes drop-spinner {
    to { transform: rotate(360deg); }
}

@keyframes pulse-text {
    from { opacity: 0.7; }
    to { opacity: 1; }
}

/* Hide normal content when dragging */
.ldr-drop-zone.ldr-drag-over .ldr-drop-zone-icon,
.ldr-drop-zone.ldr-drag-over .ldr-drop-zone-text,
.ldr-drop-zone.ldr-drag-over .ldr-drop-zone-subtext,
.ldr-drop-zone.ldr-drag-over .ldr-btn-collections {
    opacity: 0.3;
}

.ldr-drop-zone-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 10px;
}

.ldr-drop-zone-text {
    margin: 15px 0 5px;
    font-size: 18px;
    font-weight: 500;
}

.ldr-drop-zone-subtext {
    margin: 5px 0 15px;
    color: #6c757d;
}

.ldr-selected-files {
    margin-top: 15px;
    padding: 15px;
    background-color: rgba(248, 249, 250, 0.5);
    border-radius: 6px;
}

.ldr-selected-files ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.ldr-selected-files li {
    padding: 8px 12px;
    margin: 5px 0;
    background-color: rgba(255, 255, 255, 0.6);
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ldr-selected-files li i {
    color: #007bff;
}

/* Modal Styles - Optimized for performance */
.ldr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    /* Removed backdrop-filter for better performance - use darker overlay instead */
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-modal {
        animation: fadeIn 0.3s ease;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.ldr-modal-content {
    background: #ffffff;
    margin: 5% auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    /* Removed backdrop-filter for better performance */
}

@media (prefers-reduced-motion: no-preference) {
    .ldr-modal-content {
        animation: slideInDown 0.3s ease;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ldr-modal-header {
    background: rgba(102, 126, 234, 0.1);
    color: #2d3748;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ldr-modal-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.ldr-close {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
}

.ldr-close:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.ldr-modal-body {
    padding: 2rem;
}

/* Form Styles */
.ldr-form-group {
    margin-bottom: 1.5rem;
}

.ldr-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary, #e4e4e4);
    font-size: 0.95rem;
}

.ldr-form-group input[type="text"],
.ldr-form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color, #444);
    border-radius: 10px;
    background-color: var(--input-bg, #1a1a1a);
    color: var(--text-primary, #e4e4e4);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.ldr-form-group input[type="text"]:focus,
.ldr-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.ldr-form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.ldr-form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color, #444);
}

.ldr-form-help {
    color: var(--text-secondary, #999);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Button Styles - Essential for upload functionality */
.ldr-btn-collections {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.ldr-btn-collections-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    border: 3px solid #667eea;
}

/* Featured button styling (extracted from inline styles) */
.ldr-btn-featured {
    text-decoration: none;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    font-weight: 600;
}

/* Subtle pulse animation - only for users who haven't disabled motion */
@media (prefers-reduced-motion: no-preference) {
    .ldr-btn-featured:hover {
        animation: gentle-pulse 2s ease-in-out;
    }
}

@keyframes gentle-pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    }
}

.ldr-btn-collections-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ldr-btn-collections-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: #718096;
    border: 2px solid #e2e8f0;
}

.ldr-btn-collections-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-2px);
}

.ldr-btn-collections-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.ldr-btn-collections-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.ldr-btn-collections-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.ldr-btn-collections-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4);
}

.ldr-btn-collections-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.ldr-btn-collections-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

.ldr-btn-lg {
    padding: 1.25rem 2.5rem;
    font-size: 1.2rem;
    min-width: 200px;
}

.ldr-btn-outline-primary {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.ldr-btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

.ldr-btn-outline-success {
    background: transparent;
    color: #28a745;
    border: 2px solid #28a745;
}

.ldr-btn-outline-success:hover {
    background: #28a745;
    color: white;
}

.ldr-btn-outline-warning {
    background: transparent;
    color: #ffc107;
    border: 2px solid #ffc107;
}

.ldr-btn-outline-warning:hover {
    background: #ffc107;
    color: white;
}

.ldr-active {
    background: #667eea !important;
    color: white !important;
}

/* Embedding Settings Card - Optimized */
.ldr-embedding-settings-card {
    background: rgba(247, 250, 252, 0.95);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    /* Removed backdrop-filter for better performance */
}

.ldr-embedding-info h4 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.ldr-embedding-info .ldr-info-box {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-bottom: 15px;
}

.ldr-embedding-info .ldr-info-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ldr-embedding-info .ldr-info-item:last-child {
    border-bottom: none;
}

.ldr-embedding-info .ldr-info-label {
    font-weight: 600;
    color: #4a5568;
}

.ldr-embedding-info .ldr-info-value {
    color: #2d3748;
}

/* Performance Optimizations */
@media (prefers-reduced-motion: no-preference) {
    /* Hint to browser which properties will change for better optimization */
    .ldr-btn-collections,
    .ldr-stat-card,
    .ldr-document-item {
        will-change: transform, box-shadow;
    }

    .ldr-progress-fill {
        will-change: width;
    }

    /* Remove will-change after hover to free up resources */
    .ldr-btn-collections:not(:hover),
    .ldr-stat-card:not(:hover),
    .ldr-document-item:not(:hover) {
        will-change: auto;
    }
}

/* GPU acceleration for smooth animations */
.ldr-modal-content,
.ldr-btn-collections,
.ldr-stat-card {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Utility Classes for Common Patterns */
.ldr-flex-row {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.ldr-featured-section {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%), var(--card-bg, #1e1e2d) !important;
    border: 2px solid #667eea;
}

.ldr-char-counter {
    font-size: 0.875rem;
    color: var(--text-secondary, #999);
    margin-top: 0.25rem;
}

.ldr-content-padding {
    padding: 1rem;
}

.ldr-text-center-muted {
    text-align: center;
    color: var(--text-secondary, #999);
    font-style: italic;
    margin-bottom: 1rem;
}

.ldr-link-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 1rem 2rem;
}

.ldr-section-footer {
    margin-top: 2rem;
}

.ldr-hidden {
    display: none;
}

/* Guidelines styling */
.ldr-content-padding h3 {
    color: var(--text-primary, #e4e4e4);
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ldr-content-padding h3:first-child {
    margin-top: 0;
}

.ldr-content-padding h3 i {
    color: #667eea;
}

.ldr-content-padding ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.ldr-content-padding li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary, #e4e4e4);
    line-height: 1.6;
}

.ldr-content-padding li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Info Text */
.ldr-info-text {
    font-size: 1rem;
    color: var(--text-primary, #e4e4e4);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Quick Tips Styling */
.ldr-quick-tips {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.ldr-tip-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-left: 3px solid #667eea;
    border-radius: 8px;
}

.ldr-tip-item i {
    color: #667eea;
    font-size: 1.25rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.ldr-tip-item div {
    color: var(--text-primary, #e4e4e4);
    line-height: 1.6;
}

.ldr-tip-item strong {
    color: #8b9cff;
}
